project(test)


set(CMAKE_C_FLAGS "-std=c99 ${CPU}")
set(CMAKE_CXX_FLAGS "-std=c++14 ${CPU}")

set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS} -g -O0 -DLOG_LEVEL=${LOG}")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS} -w -O2 -DLOG_LEVEL=${LOG} -DNDEBUG=1")

set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS} -g -O0 -DLOG_LEVEL=${LOG}")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} -w -O2 -DLOG_LEVEL=${LOG} -DNDEBUG=1")


include_directories(
  ${PROJECT_SOURCE_DIR}/..
  /usr/include
  /usr/local/include
  /usr/java/default/include
  /usr/java/default/include/linux
  /usr/local/opt/openssl/include
  /Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/include
  /Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/include/darwin
)

link_directories(
  /usr/lib
  /usr/local/lib
  /usr/local/opt/openssl/lib
)


add_executable(date-test
  date/main.cpp
)
target_link_libraries(date-test
  jlib_static
)


add_executable(cipher-test
  cipher/main.cpp
)
target_link_libraries(date-test
  jlib_static
)


add_executable(number-test
  number/main.cpp
)
target_link_libraries(number-test
  jlib_static
)


add_executable(graphics-test
  graphics/GLFWView.cpp
  graphics/Window.cpp
  graphics/main.cpp
)
target_link_libraries(graphics-test
  jlib_static
  glfw
)
